import Content from '@/sheep/layouts/content.vue';
import { request } from '@/sheep/request';

const route = {
  path: 'supply',
  name: 'supplychian.admin.supply',
  component: Content,
  meta: {
    title: '供应商管理',
  },
  children: [
    {
      path: 'index',
      name: 'supplychian.admin.supply.index',
      component: () => import('./index/index.vue'),
      meta: {
        title: '供应商管理',
      },
    },
    {
      path: 'shop',
      name: 'supplychian.admin.supply.shop',
      component: () => import('./shop/index.vue'),
      meta: {
        title: '供应商管理',
      },
    },
    {
      path: 'supplyshop',
      name: 'supplychian.admin.shop.supplyshop',
      component: () => import('./shop/supplyshop.vue'),
      meta: {
        title: '注册地址',
      },
    },
  ],
};

const api = {
  supplyList: (params) =>
    request({
      url: '/shop/yb/goods/channelgoods/channelList',
      method: 'get',
      params,
    }),
  list: (params) =>
    request({
      url: '/main/admin/application/application/licenseList',
      method: 'GET',
      params,
    }),
  // 获取服务商列表
  serviceList: (params) =>
    request({
      url: '/main/admin/application/application/agentList',
      method: 'GET',
      params,
    }),
  checkInAssagn: (data) =>
    request({
      url: '/main/admin/application/application/assign',
      method: 'POST',
      data,
    }),
  type: () =>
    request({
      url: '/main/admin/application/application/typeList',
      method: 'GET',
    }),
};

export { route, api };
